package cn.botter.auth.common.enums;

import lombok.Getter;

@Getter
public enum UserStatusEnum {
    OPEN(0 , "用户启用"),
    CLOSE(1,"用户禁用");

    public int code;
    public String desc;

    UserStatusEnum(int code , String desc){
        this.code = code;
        this.desc = desc;
    }

    public static UserStatusEnum getByCode(int codeVal){
        for(UserStatusEnum resultCodeEnum :  UserStatusEnum.values()){
            if (resultCodeEnum.code == codeVal){
                return resultCodeEnum;
            }
        }
        return null;
    }
}
